﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Parser
{
    /// <summary>
    /// Represents the page with detail information
    /// </summary>
    /// 
    /// <author>Alexander Seeliger </author>
    public class PageProperties
    {
        /// <summary>
        /// Number of hits
        /// </summary>
        private int hits;

        /// <summary>
        /// Average traffic that has been generated
        /// </summary>
        private long averageTraffic;

        /// <summary>
        /// Traffic that has been generated by sending data
        /// </summary>
        private long sentTraffic;

        /// <summary>
        /// Average time to generate this page
        /// </summary>
        private int averageTimeTaken;

        /// <summary>
        /// Status code
        /// </summary>
        private string status;

        /// <summary>
        /// Returns or sets the traffic that has been generated by sending data
        /// </summary>
        public long SentTraffic
        {
            get 
            { 
                return sentTraffic; 
            }
            set 
            { 
                sentTraffic = value; 
            }
        }

        /// <summary>
        /// Returns or sets the status code of the page
        /// </summary>
        public string Status
        {
            get 
            { 
                return status; 
            }
            set 
            { 
                status = value; 
            }
        }

        /// <summary>
        /// Returns or sets the number of hits
        /// </summary>
        public int Hits
        {
            get 
            { 
                return hits; 
            }
            set 
            { 
                hits = value; 
            }
        }

        /// <summary>
        /// Returns or sets the average traffic generated by this page
        /// </summary>
        public long AverageTraffic
        {
            get 
            { 
                return averageTraffic; 
            }
            set 
            { 
                averageTraffic = value; 
            }
        }

        /// <summary>
        /// Returns or sets the average time taken to generate this page
        /// </summary>
        public int AverageTimeTaken
        {
            get 
            { 
                return averageTimeTaken; 
            }
            set 
            { 
                averageTimeTaken = value; 
            }
        }

        /// <summary>
        /// Constructs a new PageProperties class
        /// </summary>
        public PageProperties()
        {
        }

        /// <summary>
        /// Constructs a new PageProperties class
        /// </summary>
        /// <param name="hits"></param>
        /// <param name="averageTraffic"></param>
        /// <param name="averageTimeTaken"></param>
        /// <param name="status"></param>
        public PageProperties(int hits, long averageTraffic, int averageTimeTaken, string status)
        {
            this.hits = hits;
            this.averageTimeTaken = averageTimeTaken;
            this.averageTraffic = averageTraffic;
            this.status = status;
        }

    }
}
